home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3662 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  934 b 

  1. Path: news.fgg.eur.nl!usenet
  2. From: Stefan Nelwan <nelwan@mw_tx1.tca.fgg.eur.nl>
  3. Newsgroups: comp.lang.c++
  4. Subject: constant definitions in header files
  5. Date: Thu, 25 Jan 1996 12:29:34 +0100
  6. Organization: Thorax Centre, AZR, Rotterdam, The Netherlands
  7. Message-ID: <3107699E.3EA5@mw_tx1.tca.fgg.eur.nl>
  8. NNTP-Posting-Host: mw_tx1.tca.fgg.eur.nl
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0b6a (X11; I; HP-UX A.09.03 9000/710)
  13. CC: nelwan
  14.  
  15. Hi!
  16.  
  17. I am curious about the common implementation of using const int's in
  18. header files under 
  19. different compilers. According to "The C++ programming language"
  20. (Stroustrup), only 
  21. simple constants may be placed in header files. It is up to the compiler
  22. to ensure no
  23. redundant copies of those constants are generated. 
  24.  
  25. Are the current C++-compilers smart enough to recognize multiple copies
  26. of the constant types?
  27.  
  28.  
  29. bye,
  30.  
  31. Stefan.
  32.